<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="utf-8">
<!-- qaccessible.cpp -->
  <title>QAccessibleEvent Class | Qt GUI 5.14.2</title>
  <link rel="stylesheet" type="text/css" href="style/offline-simple.css" />
  <script type="text/javascript">
    document.getElementsByTagName("link").item(0).setAttribute("href", "style/offline.css");
    // loading style sheet breaks anchors that were jumped to before
    // so force jumping to anchor again
    setTimeout(function() {
        var anchor = location.hash;
        // need to jump to different anchor first (e.g. none)
        location.hash = "#";
        setTimeout(function() {
            location.hash = anchor;
        }, 0);
    }, 0);
  </script>
</head>
<body>
<div class="header" id="qtdocheader">
  <div class="main">
    <div class="main-rounded">
      <div class="navigationbar">
        <table><tr>
<td ><a href="../qtdoc/index.html">Qt 5.14</a></td><td ><a href="qtgui-index.html">Qt GUI</a></td><td ><a href="qtgui-module.html">C++ Classes</a></td><td >QAccessibleEvent</td></tr></table><table class="buildversion"><tr>
<td id="buildversion" width="100%" align="right"><a href="qtgui-index.html">Qt 5.14.2 Reference Documentation</a></td>
        </tr></table>
      </div>
    </div>
<div class="content">
<div class="line">
<div class="content mainContent">
<div class="sidebar">
<div class="toc">
<h3><a name="toc">Contents</a></h3>
<ul>
<li class="level1"><a href="#public-functions">Public Functions</a></li>
<li class="level1"><a href="#details">Detailed Description</a></li>
</ul>
</div>
<div class="sidebar-content" id="sidebar-content"></div></div>
<h1 class="title">QAccessibleEvent Class</h1>
<!-- $$$QAccessibleEvent-brief -->
<p>The QAccessibleEvent class is the base class for accessibility notifications. <a href="#details">More...</a></p>
<!-- @@@QAccessibleEvent -->
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> Header:</td><td class="memItemRight bottomAlign">   <span class="preprocessor">#include &lt;QAccessibleEvent&gt;</span>
</td></tr><tr><td class="memItemLeft rightAlign topAlign"> qmake:</td><td class="memItemRight bottomAlign"> QT += gui</td></tr><tr><td class="memItemLeft rightAlign topAlign"> Inherited By:</td><td class="memItemRight bottomAlign"> <p><a href="qaccessiblestatechangeevent.html">QAccessibleStateChangeEvent</a>, <a href="qaccessibletablemodelchangeevent.html">QAccessibleTableModelChangeEvent</a>, <a href="qaccessibletextcursorevent.html">QAccessibleTextCursorEvent</a>, and <a href="qaccessiblevaluechangeevent.html">QAccessibleValueChangeEvent</a></p>
</td></tr></table></div><ul>
<li><a href="qaccessibleevent-members.html">List of all members, including inherited members</a></li>
</ul>
<a name="public-functions"></a>
<h2 id="public-functions">Public Functions</h2>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qaccessibleevent.html#QAccessibleEvent-2">QAccessibleEvent</a></b>(QAccessibleInterface *<i>interface</i>, QAccessible::Event <i>type</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qaccessibleevent.html#QAccessibleEvent-1">QAccessibleEvent</a></b>(QObject *<i>object</i>, QAccessible::Event <i>type</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual </td><td class="memItemRight bottomAlign"><b><a href="qaccessibleevent.html#dtor.QAccessibleEvent">~QAccessibleEvent</a></b>()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual QAccessibleInterface *</td><td class="memItemRight bottomAlign"><b><a href="qaccessibleevent.html#accessibleInterface">accessibleInterface</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="qaccessibleevent.html#child">child</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QObject *</td><td class="memItemRight bottomAlign"><b><a href="qaccessibleevent.html#object">object</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qaccessibleevent.html#setChild">setChild</a></b>(int <i>child</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QAccessible::Event </td><td class="memItemRight bottomAlign"><b><a href="qaccessibleevent.html#type">type</a></b>() const</td></tr>
</table></div>
<a name="details"></a>
<!-- $$$QAccessibleEvent-description -->
<div class="descr">
<h2 id="details">Detailed Description</h2>
<p>This class is used with <a href="qaccessible-obsolete.html#updateAccessibility">QAccessible::updateAccessibility</a>().</p>
<p>The event type is one of the values of <a href="qaccessible.html#Event-enum">QAccessible::Event</a>. There are a number of subclasses that should be used to provide more details about the event.</p>
<p>For example to notify about a focus change when re-implementing <a href="../qtwidgets/qwidget.html#setFocus">QWidget::setFocus</a>, the event could be used as follows:</p>
<pre class="cpp">

  <span class="type">void</span> MyWidget<span class="operator">::</span>setFocus(<span class="type">Qt</span><span class="operator">::</span>FocusReason reason)
  {
      <span class="comment">// handle custom focus setting...</span>
      <span class="type">QAccessibleEvent</span> event(f<span class="operator">,</span> <span class="type"><a href="qaccessible.html">QAccessible</a></span><span class="operator">::</span>Focus);
      <span class="type"><a href="qaccessible.html">QAccessible</a></span><span class="operator">::</span>updateAccessibility(<span class="operator">&amp;</span>event);
  }

</pre>
<p>To enable in process screen readers, all events must be sent after the change has happened.</p>
</div>
<!-- @@@QAccessibleEvent -->
<div class="func">
<h2>Member Function Documentation</h2>
<!-- $$$QAccessibleEvent$$$QAccessibleEventQAccessibleInterface*QAccessible::Event -->
<h3 class="fn" id="QAccessibleEvent-2"><a name="QAccessibleEvent-2"></a>QAccessibleEvent::<span class="name">QAccessibleEvent</span>(<span class="type"><a href="qaccessibleinterface.html">QAccessibleInterface</a></span> *<i>interface</i>, <span class="type"><a href="qaccessible.html#Event-enum">QAccessible::Event</a></span> <i>type</i>)</h3>
<p>Constructs a QAccessibleEvent to notify that <i>interface</i> has changed. The event <i>type</i> describes what changed. Use this function if you already have a <a href="qaccessibleinterface.html">QAccessibleInterface</a> or no <a href="../qtcore/qobject.html">QObject</a>, otherwise consider the overload taking a <a href="../qtcore/qobject.html">QObject</a> parameter as it might be cheaper.</p>
<!-- @@@QAccessibleEvent -->
<!-- $$$QAccessibleEvent$$$QAccessibleEventQObject*QAccessible::Event -->
<h3 class="fn" id="QAccessibleEvent-1"><a name="QAccessibleEvent-1"></a>QAccessibleEvent::<span class="name">QAccessibleEvent</span>(<span class="type"><a href="../qtcore/qobject.html">QObject</a></span> *<i>object</i>, <span class="type"><a href="qaccessible.html#Event-enum">QAccessible::Event</a></span> <i>type</i>)</h3>
<p>Constructs a QAccessibleEvent to notify that <i>object</i> has changed. The event <i>type</i> describes what changed.</p>
<!-- @@@QAccessibleEvent -->
<!-- $$$~QAccessibleEvent[overload1]$$$~QAccessibleEvent -->
<h3 class="fn" id="dtor.QAccessibleEvent"><a name="dtor.QAccessibleEvent"></a><code>[virtual] </code>QAccessibleEvent::<span class="name">~QAccessibleEvent</span>()</h3>
<p>Destroys the event.</p>
<!-- @@@~QAccessibleEvent -->
<!-- $$$accessibleInterface[overload1]$$$accessibleInterface -->
<h3 class="fn" id="accessibleInterface"><a name="accessibleInterface"></a><code>[virtual] </code><span class="type"><a href="qaccessibleinterface.html">QAccessibleInterface</a></span> *QAccessibleEvent::<span class="name">accessibleInterface</span>() const</h3>
<p>Returns the <a href="qaccessibleinterface.html">QAccessibleInterface</a> associated with the event.</p>
<!-- @@@accessibleInterface -->
<!-- $$$child[overload1]$$$child -->
<h3 class="fn" id="child"><a name="child"></a><span class="type">int</span> QAccessibleEvent::<span class="name">child</span>() const</h3>
<p>Returns the child index.</p>
<p><b>See also </b><a href="qaccessibleevent.html#setChild">setChild</a>().</p>
<!-- @@@child -->
<!-- $$$object[overload1]$$$object -->
<h3 class="fn" id="object"><a name="object"></a><span class="type"><a href="../qtcore/qobject.html">QObject</a></span> *QAccessibleEvent::<span class="name">object</span>() const</h3>
<p>Returns the event object.</p>
<!-- @@@object -->
<!-- $$$setChild[overload1]$$$setChildint -->
<h3 class="fn" id="setChild"><a name="setChild"></a><span class="type">void</span> QAccessibleEvent::<span class="name">setChild</span>(<span class="type">int</span> <i>child</i>)</h3>
<p>Sets the child index to <i>child</i>.</p>
<p><b>See also </b><a href="qaccessibleevent.html#child">child</a>().</p>
<!-- @@@setChild -->
<!-- $$$type[overload1]$$$type -->
<h3 class="fn" id="type"><a name="type"></a><span class="type"><a href="qaccessible.html#Event-enum">QAccessible::Event</a></span> QAccessibleEvent::<span class="name">type</span>() const</h3>
<p>Returns the event type.</p>
<!-- @@@type -->
</div>
        </div>
       </div>
   </div>
   </div>
</div>
<div class="footer">
   <p>
   <acronym title="Copyright">&copy;</acronym> 2020 The Qt Company Ltd.
   Documentation contributions included herein are the copyrights of
   their respective owners.<br/>    The documentation provided herein is licensed under the terms of the    <a href="http://www.gnu.org/licenses/fdl.html">GNU Free Documentation    License version 1.3</a> as published by the Free Software Foundation.<br/>    Qt and respective logos are trademarks of The Qt Company Ltd.     in Finland and/or other countries worldwide. All other trademarks are property
   of their respective owners. </p>
</div>
</body>
</html>
